<template>
  <div class="cover">
    <img :src="proxy.globalInfo.imageUrl + cover" v-if="cover" />
    <img v-else src="../assets/default_img.jpg" />
  </div>
</template>

<script setup>
import { getCurrentInstance } from "vue";

const props = defineProps({
  cover: {
    type: String,
  },
});

const { proxy } = getCurrentInstance();
</script>

<style scoped lang="scss">
.cover {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  overflow: hidden;
  img {
    object-fit: cover;
    width: 100%;
  }
}
</style>